<%@page import="tx.bjdacp.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=SuperviseInfo.TABLE_ALIAS%> 维护</title>

	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</rapid:override>

<rapid:override name="content">
	<form id="queryForm" name="queryForm" action="<c:url value="/pages/SuperviseInfo/list.do"/>" method="post" style="display: inline;">
	<div class="queryPanel">
		<fieldset>
			<legend>搜索</legend>
			<table>
				<tr>
					<td class="tdLabel">企业名称</td>
					<td>
					<s:hidden id="drugSellUnitId" name="drugSellUnitId" />
						<input value="${query.drugSellUnit_unitName}" id="drugSellUnit_unitName" name="drugSellUnit_unitName" maxlength="10" />
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_SUPERVISE_DATE%></td>
					<td>
						<input value="<fmt:formatDate value='${query.superviseDateBegin}' pattern='<%=SuperviseInfo.FORMAT_SUPERVISE_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=SuperviseInfo.FORMAT_SUPERVISE_DATE%>'})" id="superviseDateBegin" name="superviseDateBegin"   />
						<input value="<fmt:formatDate value='${query.superviseDateEnd}' pattern='<%=SuperviseInfo.FORMAT_SUPERVISE_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=SuperviseInfo.FORMAT_SUPERVISE_DATE%>'})" id="superviseDateEnd" name="superviseDateEnd"   />
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_SUPERVISE_TYPE%></td>
					<td>
						<input value="${query.superviseType}" id="superviseType" name="superviseType" maxlength="100"  class=""/>
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_SUPERVISE_RESULT%></td>
					<td>
						<input value="${query.superviseResult}" id="superviseResult" name="superviseResult" maxlength="100"  class=""/>
					</td>
				</tr>
				<tr>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_DIGHT_INFO%></td>
					<td>
						<input value="${query.dightInfo}" id="dightInfo" name="dightInfo" maxlength="1000"  class=""/>
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_ATTACHMENT_FILE_NAME%></td>
					<td>
						<input value="${query.attachmentFileName}" id="attachmentFileName" name="attachmentFileName" maxlength="200"  class=""/>
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_UNIT_TYPE%></td>
					<td>
						<input value="${query.unitType}" id="unitType" name="unitType" maxlength="100"  class=""/>
					</td>
					<td class="tdLabel"><%=SuperviseInfo.ALIAS_SUPERVISE_PERSON%></td>
					<td>
						<input value="${query.supervisePerson}" id="supervisePerson" name="supervisePerson" maxlength="100"  class=""/>
					</td>
				</tr>
			</table>
		</fieldset>
		<div class="handleControl">
			<input type="submit" class="stdButton" style="width:80px" value="查询" onclick="getReferenceForm(this).action='${ctx}/pages/SuperviseInfo/list.do'"/>
			<!-- <input type="submit" class="stdButton" style="width:80px" value="新增" onclick="getReferenceForm(this).action='${ctx}/pages/SuperviseInfo/create.do'"/> -->
			<input type="button" class="stdButton" style="width:80px" value="删除" onclick="batchDelete('${ctx}/pages/SuperviseInfo/delete.do','items',document.forms.queryForm)"/>
				    	<input type="submit" class="stdButton" style="width:80px" value="导出Excel" onclick="getReferenceForm(this).action='${ctx}/pages/SuperviseInfo/listExcel.do'"/>

		<div>
	</div>

	<div class="gridTable">

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>

		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>

			  <tr>
				<th style="width:1px;"> </th>
				<th style="width:1px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>

				<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
				<th >企业名称</th>
				<th sortColumn="supervise_date" ><%=SuperviseInfo.ALIAS_SUPERVISE_DATE%></th>
				<th sortColumn="supervise_type" ><%=SuperviseInfo.ALIAS_SUPERVISE_TYPE%></th>
				<th sortColumn="supervise_result" ><%=SuperviseInfo.ALIAS_SUPERVISE_RESULT%></th>
				<th sortColumn="dight_info" ><%=SuperviseInfo.ALIAS_DIGHT_INFO%></th>
				<th sortColumn="attachment_file_name" ><%=SuperviseInfo.ALIAS_ATTACHMENT_FILE_NAME%></th>
	<th sortColumn="unit_type" ><%=SuperviseInfo.ALIAS_UNIT_TYPE%></th>
				<th sortColumn="supervise_person" ><%=SuperviseInfo.ALIAS_SUPERVISE_PERSON%></th>
				<th>操作</th>
			  </tr>

		  </thead>
		  <tbody>
		  	  <c:forEach items="${page.result}" var="item" varStatus="status">

			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td>${page.thisPageFirstElementNumber + status.index}</td>
				<td><input type="checkbox" name="items" value="superviseInfoId=${item.superviseInfoId}&"></td>

				<td><c:out value='${item.drugSellUnit.unitName}'/>&nbsp;</td>
				<td><c:out value='${item.superviseDateString}'/>&nbsp;</td>
				<td><c:out value='${item.superviseType}'/>&nbsp;</td>
				<td><c:out value='${item.superviseResult}'/>&nbsp;</td>
				<td><c:out value='${item.dightInfo}'/>&nbsp;</td>
				<td>
				<a href="${ctx}/supervise-info-files/${item.attachmentFileName}">
				<c:out value='${item.attachmentFileName}'/></a>&nbsp;</td>
				<td><c:out value='${item.unitType}'/>&nbsp;</td>
				<td><c:out value='${item.supervisePerson}'/>&nbsp;</td>
				<td>
					<a href="${ctx}/pages/SuperviseInfo/show.do?superviseInfoId=${item.superviseInfoId}&">查看</a>&nbsp;&nbsp;&nbsp;
					<a href="${ctx}/pages/SuperviseInfo/edit.do?superviseInfoId=${item.superviseInfoId}&">修改</a>
				</td>
			  </tr>

		  	  </c:forEach>
		  </tbody>
		</table>

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>
	</div>
	</form>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>

